package controller;

import java.io.IOException;

import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class LoggerController {
	private static Logger logger = Logger.getLogger(LoggerController.class);

	@RequestMapping("/")
	public void logger(HttpServletResponse resp) throws IOException {
		logger.info("logger");
		resp.getWriter().print(true);

	}

	@RequestMapping("test")
	public ModelAndView test(HttpServletResponse resp) {
		ModelAndView mv = new ModelAndView();
		mv.addObject("aaa", "ss");
		mv.setViewName("test/test");

		return mv;
	}
}
